<template>
    <div id="Boss">
		<!-- 返回导航条 -->
		<router-view name="header" fixed :component_name="Boss"></router-view>
        <br>
        <br>
        <mt-cell title="管理员名称">{{username}},你好</mt-cell>
        <br>
        <mt-button size="large" @click="goback">退出管理员界面</mt-button>
        <br>
        <mt-button size="large"@click="go">进入主页面</mt-button>
   
    </div>
</template>

<script>
import Vue from 'vue'

export default {
    name: 'Boss',
	data () {
        return {
			  username:sessionStorage.getItem("username")
		}
    },
    methods : {
        // 退出管理员界面
        goback(){
            sessionStorage.removeItem("username")
            this.$router.push({path:'/'})
        },
        // 路由跳转
        go(){
             this.$router.push({path:'/'})
        }
    }
}
    
</script>


<style>
    
</style>
